Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDL: Use Column Name Instead of Offset to Find the common handle cluster index (#5166) #5192

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #5166

What problem does this PR solve?

Issue Number: close #5154

Problem Summary:

What is changed and how it works?

in decodingSchemaSnapshot, we use column name instead of offset to find cluster index id of the common handle. Because in tiflash, we don't update the indexinfo of table_info except rename ddl action. Thus, the offset of tidb_table_info is not correctly in sometimes.

Besides, I add two DDL tests based on issue #5154, concerning about clustered index.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Fix the TiFlash crash issue that occurs after dropping a column of a table with clustered indexes under some situations.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Jun 22, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Lloyd-Pottiger
  • lidezhu

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Member Author

@ti-chi-bot: This cherry pick PR is for a release branch and has not yet been approved by release team.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick, it must first be approved by the collaborators.

AFTER it has been approved by collaborators, please ping the release team in a comment to request a cherry pick review.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-6.0 labels Jun 22, 2022
@hongyunyan
Copy link
Contributor

/rebuild

@hongyunyan
Copy link
Contributor

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 23, 2022

Coverage for changed files

Filename                                                                  Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Core/Block.cpp                                                                214                96    55.14%          43                16    62.79%         376               195    48.14%         140                72    48.57%
Debug/MockTiDB.cpp                                                            154               150     2.60%          35                33     5.71%         481               463     3.74%         102               101     0.98%
Debug/dbgFuncMockRaftCommand.cpp                                               28                28     0.00%           4                 4     0.00%         183               183     0.00%          16                16     0.00%
Debug/dbgFuncMockRaftSnapshot.cpp                                             174               162     6.90%          23                15    34.78%         553               505     8.68%         118               116     1.69%
Debug/dbgFuncRegion.cpp                                                        95                95     0.00%          13                13     0.00%         253               253     0.00%          64                64     0.00%
Debug/dbgTools.cpp                                                            168               166     1.19%          24                22     8.33%         459               446     2.83%         182               182     0.00%
Storages/Transaction/DecodingStorageSchemaSnapshot.h                           33                 1    96.97%           1                 0   100.00%          63                 1    98.41%          26                 2    92.31%
Storages/Transaction/RegionBlockReader.cpp                                     82                26    68.29%           3                 0   100.00%         164                25    84.76%          60                24    60.00%
Storages/Transaction/TiDB.cpp                                                 474               267    43.67%          45                13    71.11%         843               389    53.86%         330               149    54.85%
Storages/Transaction/TiDB.h                                                    20                 7    65.00%          16                 3    81.25%          16                 3    81.25%           6                 6     0.00%
Storages/Transaction/TiKVRecordFormat.h                                        99                10    89.90%          37                 1    97.30%         263                18    93.16%          44                 5    88.64%
Storages/Transaction/tests/RowCodecTestUtils.h                                 76                 4    94.74%          14                 0   100.00%         168                 1    99.40%          30                 2    93.33%
Storages/Transaction/tests/gtest_decoding_storage_schema_snapshot.cpp         251                36    85.66%           3                 0   100.00%          25                 0   100.00%          72                36    50.00%
Storages/Transaction/tests/gtest_region_block_reader.cpp                      593                99    83.31%          21                 0   100.00%         256                 4    98.44%         208                87    58.17%
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                        2461              1147    53.39%         282               120    57.45%        4103              2486    39.41%        1398               862    38.34%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16983      9543             43.81%    191417  96871        49.39%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 23, 2022
@ti-chi-bot
Copy link
Member Author

@hongyunyan: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 23, 2022
@JaySon-Huang
Copy link
Contributor

close as no plan for v6.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants